<!doctype html>
<html>
<head>
<title>t校园</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="css/index.css" />
</head>
<body ng-app="APP" ng-controller="appController">
	<div class="login_mask" ng-if="unLogin">
		<a href="javascript:void();" ng-click="login();">前往登录</a>
	</div>
	<header>
		<div class="logo">
			<img src="image/28.png"/>
			<span class="title">T校园</span>
			<span class="sub_title"style="color:#ccc;">订单管理</span>
		</div>
		<div class="order_tip">
			<span>当前有 <span class="order_count">{{orders.length}}</span> 份订单未处理</span>
		</div>
	</header>
	<div class="orders">
		<div class="order" ng-repeat="o in orders" ng-if="o.status==1">
			<div class="order_header" ng-click="o.show = !o.show">
				<div class="order_left">
					<div class="time">{{::o.create_time*1000|date:'yyyy/MM/dd hh:mm'}}</div>
					<div class="price">订单总额：<span>{{::o.all_price}}元</span></div>
				</div>
				<div class="order_right">
					<div class="box_name">{{boxs[o.box_id]}}</div><br />
					<button>展开详情</button>
				</div>
			</div>
			
			<div class="order_detail" ng-if="o.show">
				<div class="order_info">
					<div class="consumer">
						<span>{{o.name}}</span>
						<span>18826273321</span>
					</div>
					<div class="address">
						<span>地址：</span>
						<span>{{::o.address}}</span>
					</div>
					<button ng-click="confirmOrder(o);">确认发货</button>
				</div>
				
				<!--产品列表-->
				<div class="products">
					<div class="product" ng-repeat="ol in o.order_list">
						<span class="name">{{::ol.name}}</span>
						<span class="count">{{::ol.count}}</span>
						<span class="price">{{::ol.all_price}}</span>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<footer>
		<button ng-click="goToAdmin();">进入后台</button>
		<button ng-click="goToOrder();">订单管理</button>
	</footer>
	<script src="libs/jquery-3.1.1.min.js"></script>
	<script src="libs/layer/layer.js"></script>
	<script src="libs/angular.min.js"></script>
	<script src="js/app.js"></script>
</body>
</html>